package io.renren.modules.sys.customer.service.impl;

import io.renren.modules.sys.customer.dao.BtCustomerProBaseinfoDao;
import io.renren.modules.sys.customer.entity.BtCustomerProBaseinfoEntity;
import io.renren.modules.sys.customer.service.BtCustomerProBaseinfoService;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;



@Service("btCustomerProBaseinfoService")
public class BtCustomerProBaseinfoServiceImpl extends ServiceImpl<BtCustomerProBaseinfoDao, BtCustomerProBaseinfoEntity> implements BtCustomerProBaseinfoService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        String navbarid =(String) params.get("navbarid");
        Page<BtCustomerProBaseinfoEntity> page = this.selectPage(
                new Query<BtCustomerProBaseinfoEntity>(params).getPage(),
                new EntityWrapper<BtCustomerProBaseinfoEntity>().eq("navbarid",navbarid)
        );

        return new PageUtils(page);
    }
   public Long insertOneBackprimkey(BtCustomerProBaseinfoEntity entity){
        baseMapper.insertOneBackprimkey(entity);
        return entity.getId();
    }
}
